#ifndef INPUTGAMESTATE_H_
#define INPUTGAMESTATE_H_

#include "MenuState.h"
#include "Configuration.h"
#include <string>

class Text;

class InputGameState : public MenuState
{
public:
    InputGameState(Configuration::Key key, const std::string& header);
    virtual ~InputGameState();

    GameState* handleAlphaNumericKeys(char character);

    virtual GameState* performMenuActionBackspace();
    virtual GameState* performMenuActionReturn();
    virtual GameState* performMenuActionEscape();

    virtual GameState* handleEvent(const Event& event);

protected:
    virtual void addMenuLines();

private:
    void save();
    void deleteLastCharacter();

    Configuration::Key configKey;
    std::string header;
    std::string value;
    Text* text;
};

#endif
